//
//  Brand_ExploreTitle_View_WX.m
//  ZITHER
//
//  Created by weixin on 2019/5/20.
//  Copyright © 2019 weixn. All rights reserved.
//

#import "Brand_ExploreTitle_View_WX.h"

@implementation Brand_ExploreTitle_View_WX

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self setMasonry];
    }
    return self;
}

-(void)setMasonry{
    [self addSubview:self.leftView];
    [self addSubview:self.rightView];
    [self addSubview:self.title];

    
    [self.leftView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self).offset(15);
        make.centerY.equalTo(self).offset(0);
        make.width.mas_equalTo(100);
        make.height.mas_equalTo(2);
    }];
    [self.rightView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.equalTo(self).offset(-15);
        make.centerY.equalTo(self).offset(0);
        make.width.mas_equalTo(100);
        make.height.mas_equalTo(2);
    }];
    [self.title mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.equalTo(self).offset(0);
        make.centerY.equalTo(self).offset(0);
        make.height.mas_equalTo(16);
    }];
}

-(BaseView *)leftView{
    if (!_leftView) {
        _leftView = [[BaseView alloc]init];
        _leftView.backgroundColor = HexColor(0xeeeeee);
    }
    return _leftView;
}

-(BaseView *)rightView{
    if (!_rightView) {
        _rightView = [[BaseView alloc]init];
        _rightView.backgroundColor = HexColor(0xeeeeee);
    }
    return _rightView;
}

-(BaseLab *)title{
    if (!_title) {
        _title = [BaseLab initCustomLab:@"探索" color:HexColor(0x333333) font:[UIFont fontWithName:@"PingFang-SC-Regular" size:15]];
    }
    return _title;
}

@end
